<?php $this->_extends('_layouts/ashop_layout'); ?>
<?php $this->_block('title'); ?> <?=$store['name']?> <?php $this->_endblock(); ?>
<?php $this->_block('contents'); ?>

	<div>
		<h3>Order Detail</h3>
		<div>
			<span class="inputLabel">order id:</span>  <span><?=$order['order_id']?></span>
			<span class="inputLabel">Pay Status:</span><?=$order['status_payment']?>
			<span class="inputLabel">Ship Status:</span><?=$order['status_shiped']?>
		</div>
	</div>
	<div class="">
		<h3>Shipping Address</h3>
		<div>
			<span class="inputLabel">Email:</span><?=$order['ship_email']?><br />
			<span class="inputLabel">Gender:</span> <?php if($order['ship_gender']=='m'){echo 'Mr.';}else{echo 'MS.';} ?> <br />
			<span class="inputLabel">First Name:</span> <?=$order['ship_firstname']?><br />
			<span class="inputLabel">Last Name:</span> <?=$order['ship_lastname']?><br />
			<span class="inputLabel">Company Name:</span> <?=$order['ship_company']?> <br />
			<span class="inputLabel">Phone:</span> <?=$order['ship_phone']?><br />
			<span class="inputLabel">Street Address:</span> <?=$order['ship_street1']?><br />
			<span class="inputLabel">Address Line 2:</span> <?=$order['ship_street2']?> <br />
			<span class="inputLabel">City:</span> <?=$order['ship_cityname']?>  <br />
			<span class="inputLabel">State/Province:</span> <?=$order['ship_stateorprovince']?> <br />
			<span class="inputLabel">Post/Zip Code:</span> <?=$order['ship_postalcode']?><br />
			<span class="inputLabel">Country:</span><?=$order['ship_country']?><br />
		</div>
	</div>
	
	<div class="">
		<h3>Shipping method</h3>
		<div>
			<?=$shipment->title ?>
		</div>
	</div>
	
	<div class="">
		<h3>Pay method</h3>
		<div> select currency <?=$order['currency']?></div>
		<div>
			<?=$payment->title?>
		</div>
	</div>
	
	<div class="goodinfo">
		<table>
		<tr>
			<td height="0" width="100"></td><td></td>
		</tr>
		<?php $amount=0;
			foreach($transactions as $g):
				$q=$t->quantity;
				$total=$q*$t->price;
				$amount+=$total;
		?>
			<tr>
				<td><a href="<?=_url('product',array('goods_id'=>$t->goods_id))?>" ></a></td>
				<td>
				<a href="<?=_url('product',array('goods_id'=>$t->goods_id))?>" ><?=$t->title?></a>
				</td>
				<td><span class="price"> <?=$t->price.' '.$t->currency?> </span></td>
				<td><span class="price"><?=$t->quantity?></span></td>
				<td><span class="price"> <?=$total.' '.$t->currency?> </span></td>
				<td></td>
			<tr>
		<?php endforeach;?>
			<tr>
				<td colspan="3"></td>
				<td><?=$amount?></td>
			</tr>
		</table>
	</div>

	<div style="clear:both"></div>
	<div>
		<?php ?>
		<form name="paypal" action="<?=$paypalsever?>" method="post" target="_self">
			<input name="cmd" value="_cart" type="hidden">
			<input name="upload" value="1" type="hidden">
			<input name="business" value="<?=$business?>" type="hidden">
			<input name="item_name_1" value="coomao noebay transactions pay" type="hidden">
			<input name="custom" value="<?=$order_id?>" type="hidden">
			<input name="amount_1" value="<?=($total)?>" type="hidden">
			<input name="currency_code" value="<?=$MO->currency?>" type="hidden">
			<input name="no_shipping" value="1" type="hidden">
			<input name="no_note" value="1" type="hidden">
			<input name="return" value="<?='http://'.$this->store['domain']._url('order',array('order_id'=>$order_id,'isreturn'=>'isreturn'))?>"  type="hidden">
			<input name="notify_url" value="<?='http://'.$this->store['domain'].url('services/paypalnotifycation')?>" type="hidden">
			<input name="lc" value="GB" type="hidden">
			<input name="b1" value="   Now to pay with Paypal!   " type="submit">
		</form>
	</div>
	
</form>	
<?php $this->_endblock('contents'); ?>
